<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="../../../../../styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="11%"><strong>Package</strong></td>
    <td width="89%">com.jxl.shuriken.core</td>
  </tr>
  <tr>
    <td><strong>Class</strong></td>
    <td>public class Collection </td>
  </tr>
  <tr>
    <td><strong>Inheritance</strong></td>
    <td>Collection &gt; Object </td>
  </tr>
  <tr>
    <td><strong>Subclasses</strong></td>
    <td>&nbsp;</td>
  </tr>
</table>
<p>Collection is a class that works like an Array, and dispatches an event when it changes. In the mx component framework that ships with Flash MX 2004, Flash 8, and Flex 1.5, this was handled by decorating the Array prototype. So, when you would do an array.addItem, it'd dispatch a change event. This class does not extend array, nor is it a decoration of Array's prototype. Instead, it uses an Array via composition, adds public methods that mirror an Array's functionality of adding and removing data. This allows your components to be notified when the Array has data added or removed from it. </p>
<p>view examples</p>
<p>See also</p>
<h4>Public Properties</h4>
<p>source</p>
<h4>Public Methods</h4>
<p>Collection ( source : Array )</p>
<p>addItem ( item : Object ) : Void </p>
<p>addItemAt ( item : Object, index : Number ) : Void</p>
<p>getItemAt ( index : Number ) : Object</p>
<p>getItemIndex ( item : Object ) : Number</p>
<p>itemUpdated ( item : Object, propName : String, oldVal : Object, newVal : Object ) : Void </p>
<p>removeAll () : Void</p>
<p>removeItemAt ( index : Number ) : Object</p>
<p>setItemAt ( item : Object, index : Number ) : Object</p>
<p>getLength () : Number</p>
<p>setChangeCallback ( scope : Object, func : Function ) : Void</p>
<p>toString() : String</p>
<p>&nbsp;</p>
</body>
</html>
